<?php
require_once dirname(__FILE__) . '/Components.php';

class SmartyComponents_Hidden extends Smarty_Components
{
	/** テンプレートファイル名 */
	const TEMPLATE_NAME = 'hidden.tpl';

	/** HIDDEN情報リスト */
	public $HiddenInfoList;

	public function __construct($sCompileDir, $sCompileId)
	{
		parent::__construct(dirname(__FILE__), $sCompileDir, $sCompileId);
		$this->_HiddenInfoList = array();
	}

	public function addInfo($sName, $sValue)
	{
		$this->HiddenInfoList[] = array('Name'=>$sName,'Value'=>$sValue);
	}

	public function fetch()
	{
		$this->view->HiddenList = $this->HiddenInfoList;
		$sHtml = parent::fetch(self::TEMPLATE_NAME);
		return $sHtml;
	}
}